Skip to main content

Get AI Model by ID

Used to retrieve detailed information about a specific AI model. This allows you to view complete configuration, credentials, capabilities, and status of an individual model.

API Endpoint

PropertyValue
Request MethodGET
Request URLhttps://api.seliseblocks.com/models/{model_id}

Request

Request Example

curl -X GET 'https://api.seliseblocks.com/models/{model_id}?project_key=YOUR_PROJECT_KEY' \
-H 'accept: application/json'

Path Parameters

FieldTypeRequiredDescription
model_idstringYesThe unique identifier of the model.

Query Parameters

FieldTypeRequiredDescription
project_keystringNoProject key used to change context.

Request Headers

FieldTypeRequiredDescription
acceptstringYesAccepted response format. Use application/json
note

Model Retrieval Details

  • Returns complete model configuration including all settings
  • API keys and sensitive credentials are masked for security
  • Includes current validation status and active state
  • Shows provider-specific configuration (Azure, OpenAI, etc.)
  • Access is controlled by project permissions
tip

Use cases for retrieving model details:

  • Viewing complete model configuration for documentation
  • Auditing model settings and credentials
  • Checking model capabilities and limitations
  • Verifying provider-specific configurations
  • Reviewing validation status and troubleshooting issues
  • Confirming streaming support availability
  • Checking custom parameters and headers

The response helps you:

  • Understand model capabilities and constraints
  • Verify API configuration is correct
  • Identify credential or validation issues
  • Review custom parameters and headers
  • Check organization and project associations
  • Monitor model status and activity

Response

Success Response (200 OK)

Returns the complete model object with all configuration details.

{
"_id": "model_123",
"CreatedDate": "2025-12-01T10:30:00Z",
"LastUpdatedDate": "2026-01-10T14:20:00Z",
"CreatedBy": "user_456",
"Language": "en",
"LastUpdatedBy": "user_789",
"OrganizationIds": ["org_001"],
"Tags": ["production", "gpt-4", "primary"],
"Provider": "openai",
"ModelType": "chat",
"ServicePlatform": "official_api",
"ProjectKey": "YOUR_PROJECT_KEY",
"Description": "GPT-4 Turbo model for production use with streaming support",
"Capabilities": {
"max_tokens": 8192,
"supports_functions": true,
"supports_vision": false,
"supports_json_mode": true,
"context_window": 128000
},
"DisplayName": "GPT-4 Turbo Production",
"ModelName": "gpt-4-turbo-preview",
"ApiKey": "***masked***",
"BaseUrl": "https://api.openai.com/v1",
"OpenAiOrganizationId": "org-123456",
"OpenAiProjectId": "proj-789012",
"ApiVersion": null,
"DeploymentName": null,
"CustomParameters": {
"temperature": 0.7,
"top_p": 1,
"frequency_penalty": 0,
"presence_penalty": 0
},
"CustomHeaders": {
"X-Custom-Header": "value"
},
"Status": "valid",
"IsActive": true,
"HasStreaming": true
}

Response Fields

FieldTypeDescription
_idstringUnique identifier of the model.
CreatedDatestringISO 8601 timestamp when the model was created.
LastUpdatedDatestringISO 8601 timestamp when the model was last updated.
CreatedBystringUser ID who created the model.
LanguagestringLanguage code for the model.
LastUpdatedBystringUser ID who last updated the model.
OrganizationIdsarrayArray of organization IDs the model belongs to.
TagsarrayArray of tags for categorization and filtering.
ProviderstringAI provider name (openai, anthropic, azure, etc.).
ModelTypestringType of model (chat, embedding, completion).
ServicePlatformstringService platform type (official_api, azure, custom).
ProjectKeystringProject key the model belongs to.
DescriptionstringDetailed description of the model's purpose and use.
CapabilitiesobjectModel capabilities, features, and limitations.
DisplayNamestringHuman-readable display name.
ModelNamestringTechnical model name used in API calls.
ApiKeystringAPI key for authentication (masked in responses).
BaseUrlstringBase URL for API requests to the provider.
OpenAiOrganizationIdstringOpenAI organization ID (OpenAI models only).
OpenAiProjectIdstringOpenAI project ID (OpenAI models only).
ApiVersionstringAPI version (required for Azure OpenAI).
DeploymentNamestringDeployment name (required for Azure OpenAI).
CustomParametersobjectAdditional custom parameters for the model.
CustomHeadersobjectCustom HTTP headers for API requests.
StatusstringValidation status: "valid" or "invalid".
IsActivebooleanWhether the model is currently active and usable.
HasStreamingbooleanWhether the model supports streaming responses.

Capabilities Object

Common capability fields include:

FieldTypeDescription
max_tokensintegerMaximum number of tokens the model can generate.
supports_functionsbooleanWhether the model supports function calling.
supports_visionbooleanWhether the model supports image inputs.
supports_json_modebooleanWhether the model can output structured JSON.
context_windowintegerMaximum context window size in tokens.

Provider-Specific Fields

For OpenAI Models:

  • OpenAiOrganizationId: Organization identifier
  • OpenAiProjectId: Project identifier

For Azure OpenAI Models:

  • ApiVersion: Azure API version (e.g., "2023-12-01-preview")
  • DeploymentName: Azure deployment name
  • BaseUrl: Azure endpoint URL

For Custom Models:

  • CustomParameters: Provider-specific parameters
  • CustomHeaders: Authentication or custom headers

Error Response (422 Unprocessable Entity)

Returns validation error details when the request parameters are invalid.

{
"detail": [
{
"loc": [
"path",
"model_id"
],
"msg": "model not found",
"type": "value_error.notfound"
}
]
}

Error Response Fields

FieldTypeDescription
detailarrayArray of validation error objects.
locarrayLocation of the error in the request (e.g., path, query).
msgstringHuman-readable error message.
typestringError type identifier.

Status Interpretation

StatusMeaningRecommended Action
validCredentials are valid and model is operationalNo action needed; model is ready to use
invalidCredentials failed validation or expiredUpdate API key or reconfigure model settings

Error Codes

Status CodeDescriptionResponse Type
200Successful ResponseSuccess
400Bad Request - Invalid requestBad Request
404Not Found - Model does not existNot Found
422Validation Error - Invalid request parametersUnprocessable Entity